/*
 * @Author: your name
 * @Date: 2021-01-11 09:25:59
 * @LastEditTime: 2021-01-26 14:45:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wxapp\pages\vehicle\person\person.js
 */
var e = getApp(), t = e.requirejs("core"), a = e.requirejs("wxParse/wxParse"), i = e.requirejs("biz/diypage"), s = e.requirejs("jquery");
Page({
    /* data: {
         userInfo: {
             avatarUrl: "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=4279714354,3944998210&fm=26&gp=0.jpg",
             nickName: "Transend"
         }
     },
     onLoad: function (options) {
         let that = this;
     }*/
    data: {
        route: "member",
        icons: e.requirejs("icons"),
        member: {},
        diypages: {},
        audios: {},
        audiosObj: {},
        modelShow: !1,
        autoplay: !0,
        interval: 5e3,
        duration: 500,
        swiperheight: 0,
        iscycelbuy: !1,
        bargain: !1,
        result: {},
    },
    onLoad: function (t) {
        e.checkAuth(), this.setData({
            options: t
        });
    },
    getInfo: function () {
        var e = this;
        t.get("member", {}, function (t) {
            1 == t.isblack && wx.showModal({
                title: "无法访问",
                content: "您在商城的黑名单中，无权访问！",
                success: function (t) {
                    t.confirm && e.close(), t.cancel && e.close();
                }
            }), 0 != t.error ? wx.redirectTo({
                url: "/pages/message/auth/index"
            }) : e.setData({
                member: t,
                show: !0,
                iscycelbuy: t.iscycelbuy,
                bargain: t.bargain
            }), a.wxParse("wxParseData", "html", t.copyright, e, "5");
        });
    },
    onShow: function () {
        e.checkAuth();
        var t = this;
        this.getInfo(), wx.getSystemInfo({
            success: function (e) {
                var a = e.windowWidth / 1.7;
                t.setData({
                    windowWidth: e.windowWidth,
                    windowHeight: e.windowHeight,
                    swiperheight: a
                });
            }
        }), t.setData({
            imgUrl: e.globalData.approot
        }), i.get(this, "member", function (e) { });
    }
})